//#############################################################################
//#############################################################################
//This source file was written by Mert Dogar. If you have some questions about 
//the source code, please do not hesitate to ask me.
//The code is under GPL.
//Email: mertdogar@gmail.com , http://code.google.com/p/electron-cds
//#############################################################################
//#############################################################################

#include "main.h"
void message_window_ok_clicked();

Gtk::Dialog* message_window = 0;

void show_message_window(Glib::RefPtr<Gnome::Glade::Xml> refXml,std::string message)
{

	
	Gtk::Button* btn_ok, *btn_cancel;
	Gtk::Label* label;
	refXml->get_widget("message_window",message_window);
	refXml->get_widget("message_window_ok", btn_ok);
	refXml->get_widget("message_window_cancel", btn_cancel);
	refXml->get_widget("message_window_label", label);
	label->set_label(message);
	btn_ok->signal_clicked().connect(sigc::ptr_fun(message_window_ok_clicked));
	btn_cancel->signal_clicked().connect(sigc::ptr_fun(message_window_ok_clicked));
	message_window->show();
}

void message_window_ok_clicked()
{
	message_window->hide();
}
